<?php
require_once dirname(__DIR__)."/common.php";
use app\cls\tom\FFmpeg;
use app\cls\tom\Response;
$ffmpeg = new FFmpeg();
$oriVideoUrl=$_REQUEST['video_url'];
$use_type=isset($_REQUEST['use_type'])?$_REQUEST['use_type']:1;
if($use_type==1){
    $res=$ffmpeg->getVideoDetail($oriVideoUrl);
}else if($use_type==2){
    $res=$ffmpeg->getVideoDetail($oriVideoUrl,2);
}else if($use_type==3){
    $res=$ffmpeg->getVideoDetail($oriVideoUrl,3);
}

$data=[];
if(!empty($res)){
    Response::output(0,"成功",$res);
}else{
    Response::output(0,"失败",$data);
}
